import request from '@/utils/request'

export function fetchUserList(query) {
  return request({
    url: '/api/user/user/getPageUserList',
    method: 'post',
    data: query
  })
}

export function getUcUser(data) {
  return request({
    url: '/api/user/user/getUcUserDetail',
    method: 'post',
    data: data
  })
}

export function createUcUser(data) {
  return request({
    url: '/api/user/user/saveUcUser',
    method: 'post',
    data: data
  })
}

export function updateUcUser(data) {
  return request({
    url: '/api/user/user/updateUcUser',
    method: 'post',
    data: data
  })
}

export function getRolesByUserId(query) {
  return request({
    url: '/api/user/user/getRolesByUserId',
    method: 'post',
    data: query
  })
}

export function saveUcUserRoles(data) {
  return request({
    url: '/api/user/user/saveUcUserRole',
    method: 'post',
    data: data
  })
}
